UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VsNDNp+H1w/tRCZdfNIetp+/h8pjH6LsONkW8qkDAyI='
WHERE
key_id = '65c4203344b5ac364bb694235e87d31255454d347c749f47d0f06446c514191c'
AND (
token = 'VsNDNp+H1w/tRCZdfNIetp+/h8pjH6LsONkW8qkDAyI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)