UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QEo7ep7LWHJL8wwCoBdUwBg/GLsJzJ51a63MoziwACA='
WHERE
key_id = 'de2b4168a586e1a5a08c566f2bfb6d6ec86290d497da1b981fc178c8b40ab2ca'
AND (
token = 'QEo7ep7LWHJL8wwCoBdUwBg/GLsJzJ51a63MoziwACA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)