UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BShZwiqdDJK7isyKY9yGU6F/lvNwRYfqw4LqXLCkS3c='
WHERE
key_id = '1b0d5e535ebcdee3032634b9444b54f1589ec15fac0a58b610d062546fa551e6'
AND (
token = 'BShZwiqdDJK7isyKY9yGU6F/lvNwRYfqw4LqXLCkS3c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)