UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's+IeQdaiAmQRwaR7Anbs5JgRTaR6ECvtqWNFYz1R2/I='
WHERE
key_id = 'b93b26ccda669c5abf18155adf973a5197084d46fa918b498255bd8e20a6cc8a'
AND (
token = 's+IeQdaiAmQRwaR7Anbs5JgRTaR6ECvtqWNFYz1R2/I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)