UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Glt1t9nbKw4rhJRrBBrcrboTqk0md/aNmgCWvE0fF18='
WHERE
key_id = '2a353760534f2f8f3f86a35569a030c5c02873e3ea999d845872badc28392f9e'
AND (
token = 'Glt1t9nbKw4rhJRrBBrcrboTqk0md/aNmgCWvE0fF18='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)