UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zPUN1BwYDfjYzZouwoK5Ab+kqcrg1ZBkmjG5u3gskJo='
WHERE
key_id = 'fa50a0d05b4177747b789ac5d9727a9d0973acd3b788005bd867e23cf9c2431e'
AND (
token = 'zPUN1BwYDfjYzZouwoK5Ab+kqcrg1ZBkmjG5u3gskJo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)