UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PC1Rca+YGxkktYSXq8McSWPEv4miaEEnRn6vblmhSJE='
WHERE
key_id = '93e1d09b8acc38abff9d13925c5ac81526d9aabf0a7f277ff0e3c461c8f8e39f'
AND (
token = 'PC1Rca+YGxkktYSXq8McSWPEv4miaEEnRn6vblmhSJE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)