UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Eko7OeW3SPplEh/YNIyUz0Uyy0hJS8a9jPOI9wBY/Yg='
WHERE
key_id = '33611faf940cf7e39cca736ee9b9ba6fa14086c9fa13954ae49f6f4a0c71c121'
AND (
token = 'Eko7OeW3SPplEh/YNIyUz0Uyy0hJS8a9jPOI9wBY/Yg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)