UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XRQElOOruGAUQ3WZk/fui0uQ0FvwarKb8ESQ8dRvbDM='
WHERE
key_id = '19caf6e27d08c73eab2ecfc1791d00c06b7381511587f1635d52efa26b5a97e4'
AND (
token = 'XRQElOOruGAUQ3WZk/fui0uQ0FvwarKb8ESQ8dRvbDM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)