UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'df6vYVePxMSbl/zn5ikICbsrsp+xLSYs0Hasq5B9x1o='
WHERE
key_id = '2876d597447ccc92def55fbfd475e9672b1ca32a946e46a694df559a07eec79d'
AND (
token = 'df6vYVePxMSbl/zn5ikICbsrsp+xLSYs0Hasq5B9x1o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)