UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l73By7ggViewz5zys5eRiiFT6k0LwbF9lkuOWc7tAHo='
WHERE
key_id = '8528b54689afb5196de453d72eeca988c4aa858d0a5be2ed579e47e6c7890f24'
AND (
token = 'l73By7ggViewz5zys5eRiiFT6k0LwbF9lkuOWc7tAHo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)