UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TfXSUFDDwygWVOPPfaUTyRyQYFs+SdDIsr7ZeoSpOUY='
WHERE
key_id = '01a0e47dd7895b9b809c1776ae28851e5f6f0feab9ecf61c1dd49b7a402a7d4b'
AND (
token = 'TfXSUFDDwygWVOPPfaUTyRyQYFs+SdDIsr7ZeoSpOUY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)