UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EVkWowPXIdhixlU/qrfpdrS0sgKZXTB7x48eXtBdC6o='
WHERE
key_id = '9f96d043134e059b9cb4349fc7b8db18c524fb56e5680b5c045c9fcdc5632c00'
AND (
token = 'EVkWowPXIdhixlU/qrfpdrS0sgKZXTB7x48eXtBdC6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)