UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ohhE3bx7OQzkzsr/NCqImqynv5wZl+Ozme9SJ09Zc2s='
WHERE
key_id = '9eac2a9bdc5e6987f11635eb4d3bd3a28c5857b0b2bdb12ea61a6d5d3137fd59'
AND (
token = 'ohhE3bx7OQzkzsr/NCqImqynv5wZl+Ozme9SJ09Zc2s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)