UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u14tRd7SVTsZvrB8o/x4NMVcpYcFmmZiJFScOn2HBY4='
WHERE
key_id = '52acf6a02beb0d8c6d0881b399689dd57a40269d16688881900271076908acdc'
AND (
token = 'u14tRd7SVTsZvrB8o/x4NMVcpYcFmmZiJFScOn2HBY4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)