UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LrPf/U4mOnItwjZlrDhDebH+7fFd+jNjv1JtpAy1iFc='
WHERE
key_id = '61cb0bdec8907f91ea0cd5ff6d5c41042de5f543cbec535eff9c278b5bd60e7c'
AND (
token = 'LrPf/U4mOnItwjZlrDhDebH+7fFd+jNjv1JtpAy1iFc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)