UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LbKNmjBTaXQ2anIwp9gQLz+ySdwgZGnWxNEwKWHM/bo='
WHERE
key_id = 'b1b0c350910457dffa0dc8bd163124488a74585bafc0898c879deeb8d9bc7057'
AND (
token = 'LbKNmjBTaXQ2anIwp9gQLz+ySdwgZGnWxNEwKWHM/bo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)