UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H5ru91xpOwC+QW9C+zL6yGvvUjiWdtBcXvHLRpOpG/E='
WHERE
key_id = 'dd614e5408970d56dc98cc1d0fa55a4ea66c1b5b848032a36905ce6d2e2c7788'
AND (
token = 'H5ru91xpOwC+QW9C+zL6yGvvUjiWdtBcXvHLRpOpG/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)