UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm05dXLvEdPFgbRjpQfeRhZZt5q7t/2w565H5Rke7HbI='
WHERE
key_id = '3cb6e100f7e1a07b49c905d9d2ad06b3b7dc1c154d141c4b7822d7808483080b'
AND (
token = 'm05dXLvEdPFgbRjpQfeRhZZt5q7t/2w565H5Rke7HbI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)