UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/QdrLHGbAscsdxf0JUkv7vAglhIlsJA1Ub/VqyArpMM='
WHERE
key_id = '2a50dd966c602581ed0c19d17788f198ed55cf8f7846460777a867468de9fef2'
AND (
token = '/QdrLHGbAscsdxf0JUkv7vAglhIlsJA1Ub/VqyArpMM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)