UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DMNH7EJ4+ATbjh4Ag/hh1i81kCJMHVnbLYNpV8kF/0Q='
WHERE
key_id = '82973bc12def4b62c0b2020928f56dbd73c58dd90e1d73b5f5795fe9dd35860c'
AND (
token = 'DMNH7EJ4+ATbjh4Ag/hh1i81kCJMHVnbLYNpV8kF/0Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)