UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VEl9awL2tSxQQoLSOVT6eW5WzGbRzqtla48/4m6/otk='
WHERE
key_id = 'adc606f558080bf78ce91970192ad87caaec8e8c518e64a18caccbcd14ef1608'
AND (
token = 'VEl9awL2tSxQQoLSOVT6eW5WzGbRzqtla48/4m6/otk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)