UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aKIUC5B92ljoCnoZ8b5ZGjrfqzHwPfcni98Ms94Rp0w='
WHERE
key_id = '356192d892b50ba5bc0ff842365db1157398a13a90f7cd87a1644eb9edafa49c'
AND (
token = 'aKIUC5B92ljoCnoZ8b5ZGjrfqzHwPfcni98Ms94Rp0w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)