UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GxWPX9gaKPgTpiLrtv4eos6KCdWa7LpF2QGmwTwGCEQ='
WHERE
key_id = 'ccab2bb18154f045be51257c262f16e42e0c19387668b98d15958df2d85a28da'
AND (
token = 'GxWPX9gaKPgTpiLrtv4eos6KCdWa7LpF2QGmwTwGCEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)