UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HdHuSAlWRUZoNpxtlE4/QqX+Esk6EHN0XRQcxah83xA='
WHERE
key_id = '2375dbad76ea058c985132350dfb1be8884790be9266c89798a57c12fa9fd47d'
AND (
token = 'HdHuSAlWRUZoNpxtlE4/QqX+Esk6EHN0XRQcxah83xA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)