UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'htPY0PdZmedPiPge2foGjDUXIKHyUybiJuNNQoYD15s='
WHERE
key_id = '5a720db811facee58e90b241499c4e65a5363c5cda749a9e3d674e9b608e5566'
AND (
token = 'htPY0PdZmedPiPge2foGjDUXIKHyUybiJuNNQoYD15s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)