UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IZ3YQsz4Ir1idOtNKzn6hZY7fytlxR/vxnEfXyKWzGo='
WHERE
key_id = '6708fdeaee9ee41d5378d0c4534e7d87772383c339710cdb08004f8bbad426e6'
AND (
token = 'IZ3YQsz4Ir1idOtNKzn6hZY7fytlxR/vxnEfXyKWzGo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)